package conversion

/*
判断某个值是否在数组中
*/

func IsIn(target any, strArray []any) bool {
	for _, element := range strArray {
		if target == element {
			return true
		}
	}
	return false
}

func StringIn(target string, strArray []string) bool {
	for _, element := range strArray {
		if target == element {
			return true
		}
	}
	return false
}

func Int64In(target int64, strArray []int64) bool {
	for _, element := range strArray {
		if target == element {
			return true
		}
	}
	return false
}

func IntIn(target int, strArray []int) bool {
	for _, element := range strArray {
		if target == element {
			return true
		}
	}
	return false
}

func ByteIn(target byte, strArray []byte) bool {
	for _, element := range strArray {
		if target == element {
			return true
		}
	}
	return false
}
